package com.example.loginapp.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.loginapp.R;
import com.example.loginapp.bean.NewsBean;

import org.jetbrains.annotations.NotNull;

public class NewsAdapter extends BaseQuickAdapter<NewsBean, BaseViewHolder> {
    public NewsAdapter() {
        super(R.layout.item_user_info);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, NewsBean newsBean) {

        baseViewHolder.setImageResource(R.id.head, newsBean.getHot());
        baseViewHolder.setText(R.id.name, newsBean.getTitle());
        baseViewHolder.setText(R.id.infomation, newsBean.getTitle());
        baseViewHolder.setImageResource(R.id.math, newsBean.getDrawable() );

    }
}